﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DCTLib.Common
{
    public class AppMessages
    {
        public const string CANNOT_INSERT_EN = "Cannot insert.";
        public const string CANNOT_INSERT_VI = "Không thể tạo mới.";

        public const string CANNOT_UPDATE = "Cannot update.";
        public const string CANNOT_CREATE = "Cannot create new.";
        public const string CANNOT_SEARCH = "Cannot search.";
        public const string CANNOT_DELETE = "Cannot delete.";
        public const string CANNOT_LOAD_DATA = "Cannot load data.";
        public const string CREATE_SUCCESSFULLY = "Successfully create.";
        public const string NOT_CORRECT_OLD_PASSWORD = "Old password is not correct!";

        public const string LOGIN_FAIL = "Incorrect Username / Password.";
       
        public const string UPDATE_SUCCESSFULLY = "Successfully updated.";
        public const string INSERT_SUCCESSFULLY = "Successfully inserted.";
        public const string DELETED_SUCCESSFULLY = "Successfully deleted.";

        public const string ACCOUNT_HAS_LOCKED = "Your account has been locked.";
        public const string ACCOUNT_HAS_NOT_BEEN_ACTIVATED = "Your account has not been activated.";
        public const string ACCOUNT_DOES_NOT_EXIST = "Account doesn't exist.";

        public static string RequireField(string fieldname)
        {
            return string.Format("{0} is required.", fieldname);
        }

        public static string NotContainSpace(string fieldname)
        {
            return string.Format("{0} cannot contain a space", fieldname);
        }

        public static string InvalidField(string fieldname)
        {
            return string.Format("{0} has invalid value.", fieldname);
        }

        public static string InvalidFormat(string fieldname)
        {
            return string.Format("{0} has invalid format.", fieldname);
        }

        public static string IsCorrect(string fieldname)
        {
            return string.Format("{0} is correct.", fieldname);
        }

        public static string IsInCorrect(string fieldname)
        {
            return string.Format("{0} is incorrect.", fieldname);
        }

        public static string AlreadyExist(string fieldname)
        {
            return fieldname + " already exists";
        }

        public static string NotExisted(string fieldname)
        {
            return fieldname + " is not existed!";
        }

        public static string Success(string fieldname)
        {
            return fieldname + " successful";
        }

        public static string Failure(string fieldname)
        {
            return fieldname + " is failure!";
        }

        public static string Select(string fieldname)
        {
            return string.Format("You must select {0}", fieldname);
        }

        public static string PleaseEnterAField(string fieldname)
        {
            return string.Format("Please enter the {0}", fieldname);
        }

        public static string MustMatch(string firstField, string secondField)
        {
            return string.Format("{0} and {1} must match.", firstField, secondField);
        }


    }
}
